/*
 * XML Type:  XMonthCalendar
 * Namespace: http://www.seedwill.com/xul/widget/
 * Java type: com.seedwill.xul.widget.XMonthCalendar
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.widget.impl;
/**
 * An XML XMonthCalendar(@http://www.seedwill.com/xul/widget/).
 *
 * This is a complex type.
 */
public class XMonthCalendarImpl extends com.seedwill.xul.widget.impl.XInputImpl implements com.seedwill.xul.widget.XMonthCalendar
{
    private static final long serialVersionUID = 1L;
    
    public XMonthCalendarImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FORMAT$0 = 
        new javax.xml.namespace.QName("", "format");
    private static final javax.xml.namespace.QName DEFAULTYEAR$2 = 
        new javax.xml.namespace.QName("", "defaultYear");
    private static final javax.xml.namespace.QName DEFAULTMONTH$4 = 
        new javax.xml.namespace.QName("", "defaultMonth");
    
    
    /**
     * Gets the "format" element
     */
    public java.lang.String getFormat()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FORMAT$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "format" element
     */
    public org.apache.xmlbeans.XmlString xgetFormat()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FORMAT$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "format" element
     */
    public boolean isSetFormat()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FORMAT$0) != 0;
        }
    }
    
    /**
     * Sets the "format" element
     */
    public void setFormat(java.lang.String format)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FORMAT$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FORMAT$0);
            }
            target.setStringValue(format);
        }
    }
    
    /**
     * Sets (as xml) the "format" element
     */
    public void xsetFormat(org.apache.xmlbeans.XmlString format)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FORMAT$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FORMAT$0);
            }
            target.set(format);
        }
    }
    
    /**
     * Unsets the "format" element
     */
    public void unsetFormat()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FORMAT$0, 0);
        }
    }
    
    /**
     * Gets the "defaultYear" element
     */
    public int getDefaultYear()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DEFAULTYEAR$2, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "defaultYear" element
     */
    public org.apache.xmlbeans.XmlInt xgetDefaultYear()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DEFAULTYEAR$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "defaultYear" element
     */
    public boolean isSetDefaultYear()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DEFAULTYEAR$2) != 0;
        }
    }
    
    /**
     * Sets the "defaultYear" element
     */
    public void setDefaultYear(int defaultYear)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DEFAULTYEAR$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DEFAULTYEAR$2);
            }
            target.setIntValue(defaultYear);
        }
    }
    
    /**
     * Sets (as xml) the "defaultYear" element
     */
    public void xsetDefaultYear(org.apache.xmlbeans.XmlInt defaultYear)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DEFAULTYEAR$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(DEFAULTYEAR$2);
            }
            target.set(defaultYear);
        }
    }
    
    /**
     * Unsets the "defaultYear" element
     */
    public void unsetDefaultYear()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DEFAULTYEAR$2, 0);
        }
    }
    
    /**
     * Gets the "defaultMonth" element
     */
    public int getDefaultMonth()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DEFAULTMONTH$4, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "defaultMonth" element
     */
    public org.apache.xmlbeans.XmlInt xgetDefaultMonth()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DEFAULTMONTH$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "defaultMonth" element
     */
    public boolean isSetDefaultMonth()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DEFAULTMONTH$4) != 0;
        }
    }
    
    /**
     * Sets the "defaultMonth" element
     */
    public void setDefaultMonth(int defaultMonth)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DEFAULTMONTH$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DEFAULTMONTH$4);
            }
            target.setIntValue(defaultMonth);
        }
    }
    
    /**
     * Sets (as xml) the "defaultMonth" element
     */
    public void xsetDefaultMonth(org.apache.xmlbeans.XmlInt defaultMonth)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DEFAULTMONTH$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(DEFAULTMONTH$4);
            }
            target.set(defaultMonth);
        }
    }
    
    /**
     * Unsets the "defaultMonth" element
     */
    public void unsetDefaultMonth()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DEFAULTMONTH$4, 0);
        }
    }
}
